from typing import List
class Solution:
    def search(self, nums: List[int], target: int) -> int:
        left, right = 0, len(nums) - 1
        while left < right:
            mid = (left + right) // 2
            if nums[mid] > nums[right]:
                left = mid + 1
            else:
                right = mid



        l1=nums.index(nums[left])
        if target in nums:
            l2 = nums.index(target)
        else:
            return -1

        if l2>l1:
            return l2-l1
        return l2+l1












ll=Solution()
print(ll.search([4.5,5,6,7,0,1,2,3],4))
